﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>后台管理系统</title>
<link rel="stylesheet" href="__PUBLIC__/css/bootstrap.css" />
<script src="http://libs.baidu.com/jquery/1.8.2/jquery.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/bootstrap.min.js"></script>
<style type="text/css">
body{ background:#0066A8 url(__PUBLIC__/img/login_bg.png) no-repeat center 0px;}
.tit{ margin:auto; margin-top:170px; text-align:center; width:350px; padding-bottom:20px;}
.login-wrap{ width:220px; padding:30px 50px 0 330px; height:220px; background:#fff url(__PUBLIC__/img/20150212154319.jpg) no-repeat 30px 40px; margin:auto; overflow: hidden;}
.login_input{ display:block;width:210px;}
.login_user{ background: url(__PUBLIC__/img/input_icon_1.png) no-repeat 200px center; font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif}
.login_password{ background: url(__PUBLIC__/img/input_icon_2.png) no-repeat 200px center; font-family:"Courier New", Courier, monospace}
.btn-login{ background:#40454B; box-shadow:none; text-shadow:none; color:#fff; border:none;height:35px; line-height:26px; font-size:14px; font-family:"microsoft yahei";}
.btn-login:hover{ background:#333; color:#fff;}
.copyright{ margin:auto; margin-top:10px; text-align:center; width:370px; color:#CCC}
@media (max-height: 700px) {.tit{ margin:auto; margin-top:100px; }}
@media (max-height: 500px) {.tit{ margin:auto; margin-top:50px; }}
</style>
</head>

<body>
<div class="tit"><img src="__PUBLIC__/img/tit.png" alt="" /></div>
<div class="login-wrap">
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr>
			<td height="25" valign="bottom">用户名：</td>
		</tr>
		<tr>
			<td><input type="text" class="login_input login_user" name="uname" id="uname" value="" /></td>
		</tr>
		<tr>
			<td height="35" valign="bottom">密  码：</td>
		</tr>
		<tr>
			<td><input type="password"  class="login_input login_password" name="pwds" id="pwds" value="" /></td>
		</tr>
		<tr>
			<td height="60" valign="bottom">
				<a href="javascript:void(0);" id="submit" class="btn btn-block btn-login">登录</a>
			</td>
		</tr>
	</table>
</div>
<div class="copyright">建议使用IE8以上版本或谷歌浏览器</div>
<script>
	$(document).ready(function(){
		$("#submit").unbind('click').on('click', function(){
			var uname = $("#uname").val();
			if(uname.length <= 0){
				alert('请输入登陆用户名');
				return false;
			}
			
			var pwds = $("#pwds").val();
			if(pwds.length <= 0){
				alert('请输入登陆密码');
				return false;
			}
			
			$.post("/xj/index.html", {uname: uname, pwds: pwds}, function(data){
				switch(data.error/1){
					case 0:
					case 1:
						alert(data.message);
					break;
					case 2:
						location.reload();
					break;
				}
			}, "JSON");
		});
	});
	$("body").keydown(function(){
		if (event.keyCode == "13"){
			$('#submit').click();
		}
	});
</script>
</body>
</html>
